/******************************************************************************
 * @File name   :      IMaintainDealerDao.java
 *
 * @Author      :      ANMA
 *
 * @Date        :      Jul 15, 2015
 *
 * @Copyright Notice: 
 * Copyright (c) 2014 DMS, Inc. All  Rights Reserved.
 * This software is published under the terms of the DMS Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * ----------------------------------------------------------------------------
 * Date                         Who         Version         Comments
 * Jul 15, 2015 11:52:32 AM    ANMA      1.0            Initial Version
 *****************************************************************************/
package com.cap.bts.crmdp.dealer.masterdata.dao;

import java.math.BigInteger;
import java.util.List;

import com.cap.bts.crmdp.dealer.masterdata.domain.MasterDataDealerInfo;
import com.cap.bts.crmdp.dealer.masterdata.dto.DataFixPrcResultDto;
import com.cap.bts.crmdp.dealer.masterdata.dto.DealerChangeDto;
import com.cap.bts.crmdp.dealer.masterdata.dto.DealerQueryDto;
import com.cap.bts.crmdp.dealer.masterdata.dto.DmsDataFixResultDto;
import com.cap.bts.framework.common.dao.IBaseDao;
import com.cap.bts.framework.common.exception.AppException;

/**
 * 
 */
public interface IMaintainDealerDao extends IBaseDao<MasterDataDealerInfo, Long> {
   
	/**
     * 根据dto获取List<MasterDataDealerInfo>
     * @Date        :      2011-6-30
     * @param dto
     * @return
     * @throws AppException
     */
    public List<MasterDataDealerInfo> getMaintainDealerInfoByDto(DealerQueryDto dto) throws AppException;
    
    /**
     * @Date        :      2015年7月22日
     * @param dealerNum
     * @return
     * @throws AppException
     */
    public MasterDataDealerInfo getDealerByDealerNum(String dealerNum) throws AppException;
    
    /**
     * @Date        :      2015年7月26日
     * @param operationPwd
     * @return
     * @throws AppException
     */
    public MasterDataDealerInfo getDealerByOperationPwdAndDealerNum(String operationPwd,String dealerNum) throws AppException;
    
    /**
     * 获取所有符合条件的dealer
     * @Date        :      2015年11月3日
     * @return
     * @throws AppException
     */
    public List<BigInteger> getDealersByCode(String code,String value) throws AppException;
    
    /**
     * @return
     * @throws AppException
     */
    public List<Object[]> exportMemberAndPackageFromDealer(String storeCode) throws AppException;
    
    /**
     * @return
     * @throws AppException
     */
    public List<Object[]> exportPortfolioFromDealer(String storeCode) throws AppException;
    
    /**
     * @return
     * @throws AppException
     */
    public List<Object[]> exportMemberResultFromDealer(String storeCode) throws AppException;
    
    /**
     * @return
     * @throws AppException
     */
    public List<Object[]> exportPortfolioResultFromDealer(String storeCode) throws AppException;
    
    /**
     * @return
     */
    public List<Object[]> getAllDealerChange(DealerChangeDto dto);
    
    /**
     * @param dealerNum
     */
    public void updateChangeTimeFromDealerChange(String dealerNum,String changeDate);
    
    /**
     * @param dealerNum
     * @return
     */
    public MasterDataDealerInfo checkDealerExisted(Long dealerNum);
    
    public void saveDealerChanged(DealerChangeDto dealerChangeDto);
    
    /**
     * @param property
     * @param value
     * @return
     * @throws AppException
     */
    public String getDealersByProperty(String property,String dealerNum) throws AppException;
    
    public void saveDmsDataFixFile(List<DmsDataFixResultDto> result) throws AppException;
    
    public List<DmsDataFixResultDto> getAllDmsData();
    
    public List<Object[]> getAllMessageForSend() throws AppException;
    
    public DataFixPrcResultDto prcDmsDataFix() throws AppException;
    
    public void deleteDataFix() throws AppException;
}
